<!--{include(file='head.html')}-->

<div id="wrap">
	<!--{include('left.html')}-->
	<div id="maincont">
		<b class="b1"></b><b class="b2"></b><b class="b3"></b><b class="b4"></b>
		<div id="main_c" >
			<form name="seaform" id="seaform" action="<!--{url('admin','discount','index')}-->" method="post">
			<div class="bt_bk">
				<span class="btn">
					<a href="javascript:void(0);" onclick="$.oper.refresh();return false;">刷新</a>
					<a href="javascript:void(0);" onclick="$.oper.cdelete();return false;">删除</a>
					<a href="<!--{url('admin','discount','discountadd')}-->">添加</a>
				</span>
				<span class="state_tip"></span>
				<span class="right red">只能有一个打折活动处于发布状态</span>
				<input type="hidden" value="<!--{def($pagearr['page'],1)}-->"		name="page" id="page"/>
				<input type="hidden" value="<!--{def($pagearr['pagesize'],10)}-->"	name="pagesize" id="pagesize" />
			</div>
			</form>
			<!--{include_page("page.html","top")}-->
			<table class="tableStyle" border="0" cellspacing="0" cellpadding="0">
				<thead>
					<tr align="center">
						<th width="5%"><input type="checkbox" value="1" name="allselect" id="allselect" autocomplete="off" onclick="$.oper.selectall()"/></th>
						<th width="10%">操作</th>
						<th width="10%">是否发布</th>
						<th width="35%">主题</th>
						<th width="20%">时间</th>
					</tr>
				</thead>
				<tbody id="listtbody">
					<!--{foreach $discounts discount}-->
					<tr align="center"  id="tr_<!--{$discount.discountid}-->">
						<td><input type="checkbox" value="<!--{$discount.discountid}-->" name="singleselect" autocomplete="off"/></td>
						<td>
							<a href="<!--{url('admin','discount','discountedit','discountid=$discount.discountid')}-->" class="edit"></a>
							<a href="javascript:void(0);" onclick="$.oper.cdelete('<!--{$discount.discountid}-->');return false;" class="del"></a>
						</td>
						<td>
<a href="<!--{url('admin','discount','discountsave','opertype=editfield&field=publish&discountid=$discount.discountid')}-->" 
<!--{if $discount.ispublish}-->class="publish" title="取消发布"<!--{else}-->class="unpublish" title="设置发布"<!--{/if}-->></a>
						</td>
						<td><!--{$discount.subject}--></td>
						<td><!--{date("m-d",$discount.begintime)}--> - <!--{date("m-d",$discount.endtime)}--></td>
					</tr>
					<!--{/foreach}-->
				</tbody>
			</table>
			<!--{include_page("page.html","foot")}-->
		</div>
		<b class="b4b"></b><b class="b3b"></b><b class="b2b"></b><b class="b1b"></b>
	</div>
</div>
<!--{include(file='foot.html')}-->
<script type="text/javascript">
$(function(){
	$.oper.init("<!--{url('admin','discount','discountsave')}-->");
});
</script>